package practica02;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Eje02 {
	
	public static void main(String arg[])
	{
		int num=0;
		boolean ctr=false;
		
		InputStreamReader is = new InputStreamReader (System.in);
		BufferedReader br = new BufferedReader(is);
		
		do
		{
			try
			{
				System.out.print("Ingrese un numero: ");
				num = Integer.parseInt(br.readLine());
				System.out.println();
				ctr=true;
			}
			catch (Exception ex)
			{
				ctr=false;				
			}
		}while(ctr!=true);
		
		if(num % 2 == 0)
		{
			System.out.println("El numero es par");
		}
		else
		{
			System.out.println("El numero es impar");
		}
		
	}

}
